package com.ktjy.pojo;


import com.baomidou.mybatisplus.annotation.*;
import lombok.*;
import org.apache.ibatis.annotations.Delete;

import java.util.Date;


@NoArgsConstructor
@AllArgsConstructor
@Data  //相当于@Setter+@Getter+@ToString+@EqualsAndHashCode组合
@TableName("sys_user")
public class SysUser {
    @TableId
    @TableField("usr_id")
    private Long usrId;
    private String usrName;
    private String usrPassword;
    private Long usrRoleId;
    private Integer usrFlag;
    @TableField(exist = false)
    private String roleName;

    //影响修改和新增  需要注册插件
    @Version //1.更新的时候会多加一个条件 version  2. 更新成功之后，version字段自动1
    private Integer version;

    //影响删除和查询 不需要注册插件
    @TableLogic(value = "0",delval = "1")
    private Boolean deleted;

    @TableField(fill=FieldFill.INSERT)
    private Date createTime;
    @TableField(fill=FieldFill.UPDATE)
    private Date updateTime;
}